import QtQuick 2.13
import QtQuick.Window 2.13
import QtQuick.Controls 2.13
Page{
    width: parent.width
    height: parent.height
    Rectangle {
        id: loginFormTable
        anchors.fill: parent
        color: "#50ffffff"

        Rectangle {
            x: 25
            id: rectangle
            radius: 20
            width: parent.width - 50
            height: 32
            color: "#e1e1e1"

            TextInput {
                id: inputAccount
                width: 640
                height: 32
                color: "#000000"
                text: qsTr("824")
                anchors.verticalCenterOffset: 3
                anchors.verticalCenter: parent.verticalCenter
                font.underline: false
                font.italic: false
                font.bold: false
                font.preferShaping: true
                font.kerning: true
                font.weight: Font.Normal
                leftPadding: 16
                echoMode: TextInput.Normal
                autoScroll: true
                transformOrigin: Item.Center
                horizontalAlignment: Text.AlignLeft
                font.pixelSize: 19
            }
        }

        Rectangle {
            id: inputTokenRectangle
            x: 25
            y: 48
            radius: 100
            width: parent.width - 58 - 25
            height: 32
            color: "#e1e1e1"

            TextInput {
                id: inputToken
                width: parent.width
                height: parent.height
                color: "#000000"
                text: qsTr("a9dd6df5-a10e-47a9-8aff-ad971532d1b9")
                anchors.verticalCenterOffset: 9
                anchors.verticalCenter: parent.verticalCenter
                leftPadding: 16
                echoMode: TextInput.Password
                autoScroll: true
                transformOrigin: Item.Center
                horizontalAlignment: Text.AlignLeft
                font.pixelSize: 9
            }
        }
        Rectangle {
            id: btnLogin
            width: 32
            height: 32
            y: inputTokenRectangle.y
            x: inputTokenRectangle.width + 25
            radius: 12
            smooth: true
            clip: true
            color: "#90ffffff"
            Image {
                id: name
                width: 32
                height: 32
                source: "qrc:/other/icon/course.png"
            }

            MouseArea {
                anchors.fill: parent
                id: startLogin
            }
        }

        Connections {

            target: startLogin
            onClicked: {
                print("clicked")
                uiDologin(inputAccount.text, inputToken.text)
            }
        }
    }
}
